Skip to content

cr150 L8a: TradeLedger container swap (no streaming yet) - #419

Merged
luisleo526 merged 7 commits into
core/cr150-p00-contractsfrom
core/cr150-l8a
Oct 18, 2026
Merged

luisleo526 merged 7 commits into
core/cr150-p00-contractsfrom
core/cr150-l8a

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

CR-150 lane L8a, per DESIGN rev 6 §3.4 and its row (F5: no L5), against the P00 TradeLedger contract with T1. The base is core/cr150-p00-contracts, so this diff shows L8a only.

  • 208f2b4: a red witness (tests/test_trade_ledger.cpp: a 513-row reference-vector comparison, tail operations, copies and moves).
  • 8d24ff0: the retaining TradeLedger implementation and the closed-row owner swap.
  • 01f8972: non-frozen test helpers migrated mechanically.
  • 72637a7: the frozen oracle sources compile UNCHANGED (tests/oracle/ diff empty; check_oracle_sha256 pins hold) through a test-only snapshot accessor. The two carrier files map trades_ with #define/#undef around the frozen include only.
  • cfaf852: a reserve_effects(TradeLedger&, size_t) overload (CORE-TOP authorized).
  • 327425d: every source citation into the changed files refreshed.

Lab: rj-20261018t135609-6fe0ee green (preflight, release, debug, docs) on 327425d. The Fable gating read (including the macro bridge) comes before merge. Not to merge before the 1.6.2-rc.1 cut, and only after #413.

🤖 Generated with Claude Code

Red-first witness: the static assertion requires BacktestEngine closed rows to be TradeLedger; the P00 base still stores std::vector<Trade>. Runtime cases cover the frozen API, global windows, ownership, tail rewrites, native reports and handle reuse. Expected failure is source-derived; no compile or test was run under the CORE-TOP Mac restriction.
Implement the frozen P00 ledger in engine_orders.cpp, swap the closed-row owner, and adapt digest/sort signatures without changing their folds or ordering. Keep production retention unchanged: no seal call is installed. Explicitly select kernel-recorded equity in the new native report witness. The out-of-row engine_execution.cpp reserve_effects vector caller and frozen oracle compatibility remain reported OPEN; no local compile or test was run.
Keep live helper references on the ledger and preserve snapshot copies through iterator ranges. Replace front reads with resident iteration and update the closed-row digest probe type. Keep numeric assertion literals, fixture values, oracle sources and hash pins unchanged. This is a mechanical caller migration under SCOPE-RULING-1818; no local compilation or tests were run.
Add a test-only vector snapshot accessor to OraclePineNativeHost and map trades_ only around the two affected non-frozen carrier includes. Refresh same-size snapshots in place to preserve row references across repeated reads. Leave frozen oracle bytes, pins and P00 declarations unchanged. No build, compilation, test or guard was run.
Add the CORE-TOP-approved TradeLedger overload immediately after the vector helper. Guard the logical end and reserve the resident count through the frozen API. Preserve both existing call sites, the vector helper and P00 declarations. No build, compilation, test or guard was run.
Repair the source citations shifted by the L8a header/include and allocation-overload edits. Search docs for all 70 changed-file basenames, covering 516 mentions in 18 documentation files, rather than only the 140 lab findings.

Keep exact declaration/occurrence targets for ambiguous symbols, preserve the existing comment hash while shifting its range, and name the trail-peak carry sites explicitly. Identify archived deleted-source coordinates as historical records instead of shifting them onto unrelated live code. Preserve document line counts.

Doc-revert/source-line attribution: the edited documentation lines were introduced or last re-anchored by the following commits; the prose sources of the rewritten passages are named as well:
- 51a1989
- d093560
- 06d4107
- 44b17c1
- 868aa65
- 925f1c9
- a744bee
- f48b7c8
- 0411892
- 47184e5
- 0d76a09
- 65c69b0
- b16e11f
- caa65e4
- b97c409
- 3372b5d
- b2a578c

These include L14-A/Doxygen (51a1989), L11 archived notes (44b17c1, 06d4107), Q6 trail-peak discussion (b16e11f, caa65e4, 868aa65), and the archival paragraph's V19-A/DOCS-ENGINE history (3372b5d, b2a578c). No behavior ruling is reverted.

No source/header/test or pin changes in this commit. No build, compilation, tests, documentation guards, preflight, parity or corpus command was run under the CORE-TOP Mac restriction.
@luisleo526
luisleo526 marked this pull request as ready for review October 18, 2026 15:20
Merge the already-fetched contracts target without rebasing or rewriting the L8a history. First parent is 327425d; merge parent is 72e34d4. Preserve P00 V1/V2 from ee3083d and all L15a bar-view code together with the existing L8a ledger implementation.

Resolve 15 conflict blocks across four docs and tests/CMakeLists.txt. Combine L15a consumer/host line positions with the L8a header/order/execution offsets and explicit symbol claims. Move the L8a-only trail-peak reference to the merged consumer line 8971. Keep the existing comment hash and archived historical-coordinate wording.

Keep both L15a registrations followed by the L8a unit registration at the end of tests/CMakeLists.txt. The pinned evidence condition remains at line 3267 with its original token; its supporting 3235, 3263, 3287 and 3293-3294 lines were re-read. No evidence pin was edited.

No manual runtime changes beyond Git's automatic combination. L15a-only files remain identical to the incoming parent; L8a-only code remains identical to the first parent. Shared runtime files retain only the pre-existing L8a ledger type changes over L15a.

Doc-revert attribution: this merge preserves and reconciles documentation introduced or re-anchored by 327425d, 72e34d4 and ee3083d. The original edited prose/anchor provenance carried by the L8a doc repair is also named:

No build, compilation, tests, guards, preflight, parity or corpus command was run under the CORE-TOP Mac restriction. No push.
@luisleo526
luisleo526 merged commit 0faaf06 into core/cr150-p00-contracts Oct 18, 2026
1 check passed
luisleo526 added a commit that referenced this pull request Oct 18, 2026
Merge 0faaf06, the L8a #419 squash, on top of the prior 40dbeaa merge without rewriting history. Keep both lane implementations, incoming helper adaptations, frozen contracts and every test/guard intact.

Resolve the sole conflict at tests/CMakeLists.txt EOF by retaining the complete incoming P00/L15a/L8a registrations and appending the two L6a format-unit registration lines. Read back the fixture evidence pin at 3267 and supporting lines 3235, 3263, 3287 and 3293-3294 against the merged file.

Documentation merges retain the incoming source anchors/hash pins and the round-1 CMake coordinates from 40dbeaa: target 161, alias 162, aggregate 172-175, install 474-479, examples 390 and runner 512-513. No prose is reworded. Citation lineage remains f397d88, 47184e5 and 868aa65.

No configuration, build, test, generator or guard script run. Hooks disabled for this invocation under CORE-TOP instructions. No push; lab proof belongs to CORE-TOP.
luisleo526 added a commit that referenced this pull request Oct 18, 2026
Merge integration commit 0faaf06 (L8a #419 squash) without rewriting existing L8B or earlier merge history. Keep the integration TradeLedger implementation and mechanical test adapters, alongside the three L8B avg_*_percent prefix folds, state and derived waiver.

Resolve the sole conflict at the tail of tests/CMakeLists.txt by keeping the incoming ledger test registration at its coordinates and appending the prefix test afterward. Both lanes registrations remain beyond the manually re-read private-fixture evidence pins. Retain the incoming documentation and its symbol/range attributions from 0faaf06; shared accessor coordinates are 986, 999 and 1008 in the merged header.

No build, test, generator, guard or verification script was run here. No push.
luisleo526 added a commit that referenced this pull request Oct 18, 2026
CR150-CX for CORE-TOP: merge 0faaf06 (L8a #419 on L15a #418) into the accepted L16 head without rewriting history. Preserve the accepted lower-path provider and its guard unchanged, and retain the integration TradeLedger implementation and helper adaptations.

Resolve both CMake tail registrations after the private-fixture pins. Reconcile all six documentation conflicts against the merged source coordinates, including continuation ranges and the scheduler next_open; retain the integration symbol clarifications and trail-carry citations from 0faaf06. No tests, guards, builds or generators were executed locally. CORE-TOP owns exact-tree lab re-proof before merging PR #424.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant